Skip to contentSkip to conversation

Bug#929579: fio FTCBFS: builds for the build architecture

PATCH Martin Steigerwald 2 participants 2 messages May 27, 2019

lore
Share & tools
lore
#0 lore raw

Hi Jens, hi Helmut.

Jens, would the cross-build fixes contained in the attached debdiff (fio-3.12/debian/patches/cross.patch) be something you would consider applying upstream?

I bet it could help other distributions with cross-building capabilities as well.

Thank you,
Martin

---------- Weitergeleitete Nachricht ----------

Betreff: Bug#929579: fio FTCBFS: builds for the build architecture
Datum: Sonntag, 26. Mai 2019, 17:12:15 CEST
Von: Helmut Grohne <[email protected]>
An: Debian Bug Tracking System <[email protected]>

Source: fio
Version: 3.12-2
Tags: patch
User: [email protected]
Usertags: rebootstrap

fio fails to cross build from source, because it configures for the build architecture. fio's configure is very different from autotools and requires the user to export a variable called CROSS_COMPILE. Even then, it uses the wrong pkg-config and runs compiled executables. The attached patch makes fio cross buildable. Please consider applying it.

Helmut

-------------------------------------------------------------
Mit freundlichen Grüßen / With kind regards
Martin Steigerwald •
Proact Deutschland GmbH
Trainer
Telefon: +49 911 30999 0 •
Fax: +49 911 30999 99
Südwestpark 43 •
90449 Nürnberg •
Germany
[email protected] •
www.proact.de
Amtsgericht Nürnberg
•
HRB 18320
Geschäftsführer:
Oliver Kügow •
Richard Müller •
Jakob Høholdt
•
Peter Mikael Javestad
– Delivering Business Agility –

debian/changelog +10 -0
diff --minimal -Nru fio-3.12/debian/changelog fio-3.12/debian/changelog
@@ -1,3 +1,13 @@
+fio (3.12-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Export CROSS_COMPILE.
+    + cross.patch: Apply $CROSS_COMPILE to pkg-config and avoid running
+      compiled code.
+
+ -- Helmut Grohne <[email protected]>  Sat, 25 May 2019 14:14:03 +0200
+
 fio (3.12-2) unstable; urgency=medium
 
   * control: Depend on libglusterfs-dev instead of glusterfs-common
debian/patches/cross.patch +42 -0

42 lines not on this page · raw message

debian/patches/series +1 -0
diff --minimal -Nru fio-3.12/debian/patches/series fio-3.12/debian/patches/series
@@ -3,3 +3,4 @@
 fio2gnuplot-manpage
 configure-no-configlog
 genfio-interpreter
+cross.patch
debian/rules +6 -0
diff --minimal -Nru fio-3.12/debian/rules fio-3.12/debian/rules
@@ -9,12 +9,18 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/dpkg/architecture.mk
+
 export DEB_LDFLAGS_MAINT_PREPEND := -Wl,-z,defs -Wl,--as-needed
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 export V = 1
 
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
+endif
+
 %:
 	dh $@
 
#1 lore raw

I'd be fine with that, if someone can submit a proper, separate patch for it.

Quoted 34 lines · Martin Steigerwald

Hi Jens, hi Helmut. Jens, would the cross-build fixes contained in the attached debdiff (fio-3.12/debian/patches/cross.patch) be something you would consider applying upstream? I bet it could help other distributions with cross-building capabilities as well. Thank you, Martin ---------- Weitergeleitete Nachricht ---------- Betreff: Bug#929579: fio FTCBFS: builds for the build architecture Datum: Sonntag, 26. Mai 2019, 17:12:15 CEST Von: Helmut Grohne <[email protected]> An: Debian Bug Tracking System <[email protected]> Source: fio Version: 3.12-2 Tags: patch User: [email protected] Usertags: rebootstrap fio fails to cross build from source, because it configures for the build architecture. fio's configure is very different from autotools and requires the user to export a variable called CROSS_COMPILE. Even then, it uses the wrong pkg-config and runs compiled executables. The attached patch makes fio cross buildable. Please consider applying it. Helmut
-------------------------------------------------------------
Mit freundlichen Grüßen / With kind regards​

Martin Steigerwald  •
Proact Deutschland GmbH

Trainer

Telefon: *+49 911 30999 0* <tel:+49%20911%2030999%200>  •

	Fax: *+49 911 30999 99* <tel:>

Südwestpark 43  •

	90449 	Nürnberg	 •
	Germany

*[email protected]* <mailto:[email protected]>  •

	*www.proact.de* <https://www.proact.de/>

Amtsgericht Nürnberg

	 •
	HRB 18320

Geschäftsführer:
Oliver Kügow  •
Richard Müller  •
Jakob Høholdt
 •
Peter Mikael Javestad

– Delivering Business Agility –

Proact Wissenstag <https://go.proact.eu/Proact-Wissenstage-Anmeldung>

Signature · 1 line
Jens Axboe